<?php

	class PageView{
		
	private $m_charset;
	 
	/**
	* Called when using new PageView();
	* @param string $charset  
	**/
	public function __construct($charset = "utf-8") {
		$this->m_charset = $charset;
	}
	
	public function Header($title){

		return "
		<!DOCTYPE HTML>
		<html>	
		<head>
			<meta charset='utf-8' />
			<title>$title</title>
			<link rel=stylesheet href='style.css' type='text/css' >
			<link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
		</head>
		<body>
		<div id='wrapper'>
		<header id='header'>
		".this::Navigation()."
		</header>
		";
		
	}
	
	public function Navigation($currentpage){
		return "<nav id='nav'></nav>";
	}
	
	public function Footer(){
		return "<footer id='footer'>
		</footer>
		</div>
		</html>";
	}
				
	
	public function RenderHTMLPage($title, $body){
			
		return "
		<!DOCTYPE HTML>
		<html>	
		<head>
			<meta charset='utf-8' />
			<title>$title</title>
			<link rel=stylesheet href='style.css' type='text/css' >
			<link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
		</head>
		<body>
		<div id='wrapper'>
			$body
		</div>
		</body>	
			
			
		</html>";
	}
	
	//Funktion som laddor om sidan
	public function RemoveGet(){
		$url = $_SERVER['REQUEST_URI'];
		$url = strtok($url, '?');
		header("Location: $url");
	}	
	
}